#pragma once

#include <initguid.h>
#include <ObjBase.h>

// {22D41C51-3446-43bb-B47A-9E4D74FD8A44}
DEFINE_GUID(CLSID_IExample, 0x22d41c51, 0x3446, 0x43bb, 0xb4, 0x7a, 0x9e, 0x4d, 0x74, 0xfd, 0x8a, 0x44);

// {EFD99BA8-EBAB-4b01-B10D-C76A355A10DB}
DEFINE_GUID(IID_IExample, 0xefd99ba8, 0xebab, 0x4b01, 0xb1, 0xd, 0xc7, 0x6a, 0x35, 0x5a, 0x10, 0xdb);

// {7A8FF4C8-E448-4d24-90E9-C90A8ADD4513}
DEFINE_GUID(TLBID_IExample, 0x7a8ff4c8, 0xe448, 0x4d24, 0x90, 0xe9, 0xc9, 0xa, 0x8a, 0xdd, 0x45, 0x13);

#undef INTERFACE
#define INTERFACE IExample
DECLARE_INTERFACE_(INTERFACE, IDispatch)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID, void **) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT *) PURE;
    STDMETHOD(GetTypeInfo)(THIS_ UINT, LCID, ITypeInfo **) PURE;
    STDMETHOD(GetIDsOfNames)(THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *) PURE;
    STDMETHOD(Invoke)(THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) PURE;
    STDMETHOD(SetString)(THIS_ BSTR) PURE;
    STDMETHOD(GetString)(THIS_ BSTR *) PURE;
    STDMETHOD(GetPorts)(THIS_ IDispatch **) PURE;
    STDMETHOD(GetNetCards)(THIS_ IDispatch **) PURE;
};

// {D7CDDC31-19AB-4af4-AB4B-138F11EFB451}
DEFINE_GUID(IID_INetCard, 0xd7cddc31, 0x19ab, 0x4af4, 0xab, 0x4b, 0x13, 0x8f, 0x11, 0xef, 0xb4, 0x51);

#undef INTERFACE
#define INTERFACE INetCard
DECLARE_INTERFACE_(INTERFACE, IDispatch)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID, void **) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT *) PURE;
    STDMETHOD(GetTypeInfo)(THIS_ UINT, LCID, ITypeInfo **) PURE;
    STDMETHOD(GetIDsOfNames)(THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *) PURE;
    STDMETHOD(Invoke)(THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) PURE;
    STDMETHOD(GetName)(THIS_ BSTR *) PURE;
    STDMETHOD(GetAddress)(THIS_ BSTR *) PURE;
};
